#pragma once

//Be careful!Using Convex_hull, the exact predict kernal is needed
#include "CGALDefinition.h"
#include "MODELOBJDef.h"

#include <CGAL/Convex_hull_traits_3.h>
#include <CGAL/convex_hull_incremental_3.h>

#ifdef MYLIB_API_EXPORT
#define MYLIB_API __declspec(dllexport)
#else
#define MYLIB_API __declspec(dllimport)
#endif


class MYLIB_API CConvexHull
{
private:
	typedef Polyhedron_3::Face_iterator Face_itr;

public:
	CConvexHull(void);
	~CConvexHull(void);

	static CConvexHull* GetSingleton()
	{
		if (NULL == _instance.get())
		{
			_instance.reset(new CConvexHull);
		}
		return _instance.get();
	}

public:
	void ConvexModel(ModelOBJ* model);

protected:
	static std::auto_ptr<CConvexHull> _instance;
};
